<?php
@session_start();
$user=$_SESSION["user"];
include_once 'DB.php';
$db = new DB ();
$xq=$_GET["xq"];
$cc=$_GET["code"];
$db->addmood($cc,$xq,$user["id"]);

?>
<script>
window.location.href="query.php?q=<?php echo $cc;?>"
</script>